#!/bin/bash

set -e

tname=$(mktemp -d cgclean.XXXXXX)
mount -t cgroup none $tname -o "none,name=zdtmtst"

echo "Cleaning $tname"

set +e
rmdir "$tname/subcg00/subsubcg/"
rmdir "$tname/subcg00/"
set -e

echo "Left there is:"
ls "$tname"
umount "$tname"
rmdir "$tname"
